import type {InjectionKey, Ref} from "vue";

export const provideFormSlot = Symbol() as InjectionKey<{
    error_map:Ref<{[name:string]: string}>;
    push_item: (form_item:{props:any, update_value:(val:any)=>Promise<any>, validate:()=>string, value:Ref<any>})=>number;
    delete_item: (index:number)=>void;
}>

export const provideIframe = Symbol() as InjectionKey<{
    key: string,
    href: string
    path: string
    param: object;
    show: boolean;
    z_index: number;
    btns: any[];
    width: string;
    title: string;
    app?: any;
}>

export const provideActionUrl = Symbol() as InjectionKey<string|undefined>
export const provideRequestTableSlot = Symbol() as InjectionKey<{
    url: string;
    data_change: (key:string, value:any)=>any
}>

